package com.vincent.template.domain;

import com.vincent.template.commons.base.BaseIdEntity;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Index;
import javax.persistence.Table;
import javax.persistence.UniqueConstraint;

/**
 * 绑定 权限-uri资源
 * @Author Vincent Wang
 * @Date 2020/10/21 14:42
 */
@Entity
@Table(name = "sys_bind_auth_uri",
        indexes = {@Index(name = "idx_uriId", columnList = "uriId")},
        uniqueConstraints = {@UniqueConstraint(name = "UK_authId_uriId", columnNames = {"authId","uriId"})})
public class SysBindAuthUriPo extends BaseIdEntity {

    /**
     * 权限ID
     */
    @Column(nullable = false)
    private Long authId;

    /**
     * uri资源ID
     */
    @Column(nullable = false)
    private Long uriId;

    public SysBindAuthUriPo() {
    }

    public SysBindAuthUriPo(Long authId, Long uriId) {
        this.authId = authId;
        this.uriId = uriId;
    }

    public Long getAuthId() {
        return authId;
    }

    public void setAuthId(Long authId) {
        this.authId = authId;
    }

    public Long getUriId() {
        return uriId;
    }

    public void setUriId(Long uriId) {
        this.uriId = uriId;
    }
}
